from rest_framework import serializers

from doctor.doctorser import DoctorSerializer, PatientDetailSerializer
from payorder import models
from user.userser import UserSerializer


class OrderDetailSerializer(serializers.ModelSerializer):
    doctor = DoctorSerializer()
    patient = PatientDetailSerializer()
    user = UserSerializer()

    class Meta:
        model = models.payorder
        fields = '__all__'


class CouponsSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Coupons
        fields = '__all__'
